package com.survey.system.domain;

import com.survey.common.core.domain.entity.SysDept;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.survey.common.annotation.Excel;
import com.survey.common.core.domain.BaseEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * 地区对象 sur_region
 *
 * @author ruoyi
 * @date 2024-12-23
 */
public class SurRegion extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 地区id
     */
    private Long regionId;

    /**
     * 地区名称
     */
    @Excel(name = "地区名称")
    private String regionName;

    /**
     * 父id
     */
    @Excel(name = "父id")
    private Long parentId;

    private List<SurRegion> children = new ArrayList<>();

    private String delFlag;

    public void setRegionId(Long regionId) {
        this.regionId = regionId;
    }

    public Long getRegionId() {
        return regionId;
    }

    public void setRegionName(String regionName) {
        this.regionName = regionName;
    }

    public String getRegionName() {
        return regionName;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Long getParentId() {
        return parentId;
    }

    public List<SurRegion> getChildren() {
        return children;
    }

    public void setChildren(List<SurRegion> children) {
        this.children = children;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("regionId", getRegionId())
                .append("regionName", getRegionName())
                .append("parentId", getParentId())
                .append("delFlag", getDelFlag())
                .toString();
    }
}
